<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
	<table class="table table-striped">
      <tbody>
        <tr>
          <td>支付宝配置</td>
          <td>
            <div class="row">
              <div class="col-sm-12 col-xs-12">
                <dl class="fieldlist" data-name="row[alipay_config]">
                  <?php 
$alipay_config = json_decode($row['alipay_config'],true);
if (!$alipay_config || !is_array($alipay_config)){
$alipay_config=[
[
	'type'=>'',
	'url_id'=>'',
	'id_email'=>'',
	'key'=>'',

]
];
}
foreach($alipay_config as $k => $v){ 
?>
                  <dd class="form-inline">
                    <select name="row[alipay_config][{$k}][type]" class="form-control">
                      <option value="auth" {if condition="$v.type eq 'auth'"} selected="selected" {/if}>官方</option>
                      <option value="easy" {if condition="$v.type eq 'easy'"} selected="selected" {/if}>易支付</option>
                    </select>
                    <input type="text" name="row[alipay_config][{$k}][url_id]" class="form-control" value="{$v.url_id}" size="20" placeholder="易支付网址/支付宝ID">
                    <input type="text" name="row[alipay_config][{$k}][id_email]" class="form-control" value="{$v.id_email}" size="20" placeholder="易支付ID/支付宝邮箱">
                    <input type="text" name="row[alipay_config][{$k}][key]" class="form-control" value="{$v.key}" size="20" placeholder="易支付Key/支付宝Key">
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                  </dd>
                  <?php }?>
                  <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success pay-append"><i class="fa fa-plus"></i> 追加</a>
                  </dd>
                </dl>
              </div>
            </div>
          </td>
        </tr>
        <tr>
          <td>QQ支付配置</td> 
          <td>
            <div class="row">
              <div class="col-sm-12 col-xs-12">
                <dl class="fieldlist" data-name="row[qqpay_config]">
                  <?php 
$qqpay_config = json_decode($row['qqpay_config'],true);
if (!$qqpay_config || !is_array($qqpay_config)){
$qqpay_config=[
[
	'type'=>'',
	'url_id'=>'',
	'id_email'=>'',
	'key'=>'',

]
];
}
foreach($qqpay_config as $k => $v){ 
?>
                  <dd class="form-inline">
                    <select name="row[qqpay_config][{$k}][type]" class="form-control">
                      <option value="auth" {if condition="$v.type eq 'auth'"} selected="selected" {/if}>官方</option>
                      <option value="easy" {if condition="$v.type eq 'easy'"} selected="selected" {/if}>易支付</option>
                    </select>
                    <input type="text" name="row[qqpay_config][{$k}][url_id]" class="form-control" value="{$v.url_id}" size="20" placeholder="易支付网址/QQ ID">
                    <input type="text" name="row[qqpay_config][{$k}][id_email]" class="form-control" value="{$v.id_email}" size="20" placeholder="易支付ID/QQ随便填">
                    <input type="text" name="row[qqpay_config][{$k}][key]" class="form-control" value="{$v.key}" size="20" placeholder="易支付key/QQ key">
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                  </dd>
                  <?php }?>
                  <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success pay-append"><i class="fa fa-plus"></i> 追加</a>
                  </dd>
                </dl>
              </div>
            </div>
          </td>
        </tr>
        <tr>
          <td>微信支付配置</td>
          <td>
            <div class="row">
              <div class="col-sm-12 col-xs-12">
                <dl class="fieldlist" data-name="row[wxpay_config]">
                  <?php 
$wxpay_config = json_decode($row['wxpay_config'],true);
if (!$wxpay_config || !is_array($wxpay_config)){
$wxpay_config=[
[
	'type'=>'',
	'url_id'=>'',
	'id_email'=>'',
	'key'=>'',
	'h5'=>'',
	'appsecret'=>'',
]
];
}
foreach($wxpay_config as $k => $v){ 
?>
                  <dd class="form-inline">
                    <select name="row[wxpay_config][{$k}][type]" class="form-control">
                      <option value="auth" {if condition="$v.type eq 'auth'"} selected="selected" {/if}>官方</option>
                      <option value="easy" {if condition="$v.type eq 'easy'"} selected="selected" {/if}>易支付</option>
                      <option value="ysh" {if condition="$v.type eq 'ysh'"} selected="selected" {/if}>易商户</option>
                    </select>
                    <select name="row[wxpay_config][{$k}][h5]" class="form-control">
                      <option value="1" {if condition="$v.h5 eq '1'"} selected="selected" {/if}>H5开启</option>
                      <option value="0" {if condition="$v.h5 eq '0'"} selected="selected" {/if}>H5关闭</option>
                    </select>
                    <input type="text" name="row[wxpay_config][{$k}][url_id]" class="form-control" value="{$v.url_id}" size="20" placeholder="易支付网址/微信APPID/易商户随便填">
                    <input type="text" name="row[wxpay_config][{$k}][id_email]" class="form-control" value="{$v.id_email}" size="20" placeholder="易支付ID/微信MCHID/易商户ID">
                    <input type="text" name="row[wxpay_config][{$k}][key]" class="form-control" value="{$v.key}" size="20" placeholder="易支付Key/微信KEY/易商户Key">
                    <input type="text" name="row[wxpay_config][{$k}][appsecret]" class="form-control" value="{:isset($v.appsecret) ? $v.appsecret : ''}" size="20" placeholder="易支付不填/微信AppSecret/易商户AppSecret">
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                  </dd>
                  <?php }?>
                  <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success pay-append"><i class="fa fa-plus"></i> 追加</a>
                  </dd>
                </dl>
              </div>
            </div>
          </td>
        </tr>
        </tbody>
                        </table>
  <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('单独通道')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[dd]', ['1'=>__('开启'), '0'=>__('关闭')], $row['dd'])}
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label for="c-group_id" class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupList}
        </div>
    </div>
    <div class="form-group">
        <label for="c-username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-username" data-rule="required" class="form-control" name="row[username]" type="text" value="{$row.username}">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-nickname" class="form-control" name="row[nickname]" type="text" value="{$row.nickname}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-password" data-rule="" class="form-control" name="row[password]" type="text" value="" placeholder="{:__('Leave password blank if dont want to change')}" autocomplete="new-password" />
        </div>
    </div>
    <div class="form-group">
        <label for="c-email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-email" data-rule="" class="form-control" name="row[email]" type="text" value="{$row.email}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-mobile" data-rule="" class="form-control" name="row[mobile]" type="text" value="{$row.mobile}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-qq" class="control-label col-xs-12 col-sm-2">{:__('QQ')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-qq" data-rule="" class="form-control" name="row[qq]" type="text" value="{$row.qq}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-money" class="control-label col-xs-12 col-sm-2">账户余额:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-money" data-rule="" class="form-control" name="row[money]" type="text" value="{$row.money}">
        </div>
    </div>
    <hr>
    <div class="form-group">
        <label for="c-api_id" class="control-label col-xs-12 col-sm-2">{:__('Api_id')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-api_id" data-rule="" class="form-control" name="row[api_id]" type="text" value="{$row.api_id}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-api_key" class="control-label col-xs-12 col-sm-2">{:__('Api_key')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-api_key" data-rule="" class="form-control" name="row[api_key]" type="text" value="{$row.api_key}">
        </div>
    </div>
    <hr>
    <div class="form-group">
        <label for="c-withdraw_name" class="control-label col-xs-12 col-sm-2">收款名字:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-withdraw_name" data-rule="" class="form-control" name="row[withdraw_name]" type="text" value="{$row.withdraw_name}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-withdraw_type" class="control-label col-xs-12 col-sm-2">收款方式:</label>
        <div class="col-xs-12 col-sm-4">
            <select id="c-withdraw_type" class="form-control" name="row[withdraw_type]">
                <option value="QQ钱包" {if condition="$row.withdraw_type eq 'QQ钱包'"} selected="selected" {/if}>QQ钱包</option>
                <option value="微信" {if condition="$row.withdraw_type eq '微信'"} selected="selected" {/if}>微信</option>
                <option value="支付宝" {if condition="$row.withdraw_type eq '支付宝'"} selected="selected" {/if}>支付宝</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label for="c-withdraw_account" class="control-label col-xs-12 col-sm-2">收款账号:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-withdraw_account" data-rule="" class="form-control" name="row[withdraw_account]" type="text" value="{$row.withdraw_account}">
        </div>
    </div>
    <hr>
    <div class="form-group">
        <label for="c-qqpay_rate" class="control-label col-xs-12 col-sm-2">QQ费率:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-qqpay_rate" data-rule="" class="form-control" name="row[qqpay_rate]" type="text" value="{$row.qqpay_rate}" placeholder="不设置为默认费率">
        </div>
    </div>
    <div class="form-group">
        <label for="c-alipay_rate" class="control-label col-xs-12 col-sm-2">支付宝费率:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-alipay_rate" data-rule="" class="form-control" name="row[alipay_rate]" type="text" value="{$row.alipay_rate}" placeholder="不设置为默认费率">
        </div>
    </div>
    <div class="form-group">
        <label for="c-wxpay_rate" class="control-label col-xs-12 col-sm-2">微信费率:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-wxpay_rate" data-rule="" class="form-control" name="row[wxpay_rate]" type="text" value="{$row.wxpay_rate}" placeholder="不设置为默认费率">
        </div>
    </div>
    <hr>
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('关闭')], $row['status'])}
        </div>
    </div>
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('提现')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[withdraw]', ['1'=>__('开启'), '0'=>__('关闭')], $row['withdraw'])}
        </div>
    </div>
    <hr>
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('QQ钱包')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[qqpay]', ['1'=>__('开启'), '0'=>__('关闭')], $row['qqpay'])}
        </div>
    </div>
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('支付宝')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[alipay]', ['1'=>__('开启'), '0'=>__('关闭')], $row['alipay'])}
        </div>
    </div>
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('微信')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[wxpay]', ['1'=>__('开启'), '0'=>__('关闭')], $row['wxpay'])}
        </div>
    </div>
    <hr>
    <div class="form-group" style="display: none">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[avatar]" type="text" value="{$row.avatar}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group" style="display: none" >
        <label for="c-level" class="control-label col-xs-12 col-sm-2">{:__('Level')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-level" data-rule="required" class="form-control" name="row[level]" type="number" value="{$row.level}">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label for="c-gender" class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[gender]', ['1'=>__('Male'), '0'=>__('Female')], $row['gender'])}
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label for="c-birthday" class="control-label col-xs-12 col-sm-2">{:__('Birthday')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-birthday" data-rule="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[birthday]" type="text" value="{$row.birthday}">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label for="c-bio" class="control-label col-xs-12 col-sm-2">{:__('Bio')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-bio" data-rule="" class="form-control" name="row[bio]" type="text" value="{$row.bio}">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label for="c-score" class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-score" data-rule="" class="form-control" name="row[score]" type="number" value="{$row.score}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-successions" class="control-label col-xs-12 col-sm-2">{:__('Successions')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-successions" class="form-control" name="row[successions]" type="number" value="{$row.successions}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-maxsuccessions" class="control-label col-xs-12 col-sm-2">{:__('Maxsuccessions')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-maxsuccessions" class="form-control" name="row[maxsuccessions]" type="number" value="{$row.maxsuccessions}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-prevtime" class="control-label col-xs-12 col-sm-2">{:__('Prevtime')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-prevtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[prevtime]" type="text" value="{$row.prevtime|datetime}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-logintime" class="control-label col-xs-12 col-sm-2">{:__('Logintime')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-logintime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[logintime]" type="text" value="{$row.logintime|datetime}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-loginip" class="control-label col-xs-12 col-sm-2">{:__('Loginip')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-loginip" class="form-control" name="row[loginip]" type="text" value="{$row.loginip}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-loginfailure" class="control-label col-xs-12 col-sm-2">{:__('Loginfailure')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-loginfailure" class="form-control" name="row[loginfailure]" type="number" value="{$row.loginfailure}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-joinip" class="control-label col-xs-12 col-sm-2">{:__('Joinip')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-joinip" class="form-control" name="row[joinip]" type="text" value="{$row.joinip}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-jointime" class="control-label col-xs-12 col-sm-2">{:__('Jointime')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-jointime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[jointime]" type="text" value="{$row.jointime|datetime}">
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
